#coding:utf-8
from flask import Flask
from flask import request,jsonify
import sys
reload(sys)
sys.setdefaultencoding('utf8')
app = Flask(__name__)
from flask import render_template
@app.route('/<ff>')
def hello(ff=None):
    dict = request.values.to_dict()
    test = dict["test"]
    return render_template('hello.html', name=ff,testVar = test)

@app.route('/')
def index():
    return render_template('common/navbar.html')

@app.route('/test', methods= ["POST"])
def test():

    print "recierve request"
    return jsonify(name="图例learn", type="line",data=[1,2,3,5,2])

if __name__ == '__main__':
    app.run()